package com.ruoyi.SSL.service.impl;

import java.util.List;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.aliyun.cdn20180510.models.DescribeDomainCertificateInfoResponseBody;
import com.ruoyi.SSL.domain.SslApply;
import com.ruoyi.SSL.domain.SslDomain;
import com.ruoyi.SSL.service.ISslCloudKeyService;
import com.ruoyi.SSL.service.ISslDomainService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.utils.aly.AlyCDNDomainApiUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.SSL.mapper.SslCloudProductDeployMapper;
import com.ruoyi.SSL.domain.SslCloudProductDeploy;
import com.ruoyi.SSL.service.ISslCloudProductDeployService;
import com.ruoyi.common.core.text.Convert;

/**
 * 云产品自动部署信息Service业务层处理
 *
 * @author ruoyi
 * @date 2024-12-12
 */
@Service
public class SslCloudProductDeployServiceImpl implements ISslCloudProductDeployService
{
    @Autowired
    private SslCloudProductDeployMapper sslCloudProductDeployMapper;

    /**
     * 查询云产品自动部署信息
     *
     * @param id 云产品自动部署信息主键
     * @return 云产品自动部署信息
     */
    @Override
    public SslCloudProductDeploy selectSslCloudProductDeployById(String id)
    {
        return sslCloudProductDeployMapper.selectSslCloudProductDeployById(id);
    }

    /**
     * 查询云产品自动部署信息列表
     *
     * @param sslCloudProductDeploy 云产品自动部署信息
     * @return 云产品自动部署信息
     */
    @Override
    public List<SslCloudProductDeploy> selectSslCloudProductDeployList(SslCloudProductDeploy sslCloudProductDeploy)
    {
        return sslCloudProductDeployMapper.selectSslCloudProductDeployList(sslCloudProductDeploy);
    }

    /**
     * 新增云产品自动部署信息
     *
     * @param sslCloudProductDeploy 云产品自动部署信息
     * @return 结果
     */
    @Override
    public int insertSslCloudProductDeploy(SslCloudProductDeploy sslCloudProductDeploy)
    {
        sslCloudProductDeploy.setCreateTime(DateUtils.getNowDate());
        return sslCloudProductDeployMapper.insertSslCloudProductDeploy(sslCloudProductDeploy);
    }

    /**
     * 修改云产品自动部署信息
     *
     * @param sslCloudProductDeploy 云产品自动部署信息
     * @return 结果
     */
    @Override
    public int updateSslCloudProductDeploy(SslCloudProductDeploy sslCloudProductDeploy)
    {
        sslCloudProductDeploy.setUpdateTime(DateUtils.getNowDate());
        return sslCloudProductDeployMapper.updateSslCloudProductDeploy(sslCloudProductDeploy);
    }

    /**
     * 批量删除云产品自动部署信息
     *
     * @param ids 需要删除的云产品自动部署信息主键
     * @return 结果
     */
    @Override
    public int deleteSslCloudProductDeployByIds(String ids)
    {
        return sslCloudProductDeployMapper.deleteSslCloudProductDeployByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除云产品自动部署信息信息
     *
     * @param id 云产品自动部署信息主键
     * @return 结果
     */
    @Override
    public int deleteSslCloudProductDeployById(String id)
    {
        return sslCloudProductDeployMapper.deleteSslCloudProductDeployById(id);
    }

}
